package com.scalar.chiptrack.sales;

import java.util.ArrayList;
import java.util.Random;

import com.scalar.chiptrack.commons.Address;


public class Customer
{

    // ----------------------------------------------------- Instance Variables
    //

    private String customerName = null;
    private String customerNumber = null;
    private String contactPerson = null;
    private String shippingMethod1 = null;
    private String shippingMethod2 = null;
    private String shippingMethod3 = null;
    private String shippingAccount1 = null;
    private String shippingAccount2 = null;
    private String shippingAccount3 = null;
    private String region = null;
    private String repOffice = null;
    private String salesPerson = null;
    private String salesRep = null;
    private String shippingInstructions = null;
    private int defaultShippingAddressId = -1;
    private int defaultBillingAddressId = -1;
    private String priority = null;
    private int cancellationWindow;
    private boolean revisionRestriction = false;
    public boolean locationRestriction = false;
    private String[] selectedLocations;
    private boolean dateCodeRestriction = false;
    private String noOfDateCodeRestrictions = null;
    private boolean trayCodeRestriction = false;
    private String noOfTrayCodeRestrictions = null;
    private int leastShippableQty;
    private int creditLimit;
    private String repId = null;
    private String repName = null;
    private String terms = null;

    private String newShippingMethod1 = null;
    private String newShippingAccount1 = null;
    private String newShippingMethod2 = null;
    private String newShippingAccount2 = null;
    private String newShippingMethod3 = null;
    private String newShippingAccount3 = null;
    private ArrayList shippingMethods = null;

    //Added shipping instructions
    private boolean shippingRestriction = false;
    private int noOfShippingDays = 0;

    private Address billingAddress = new Address();
    private Address shippingAddress = new Address();
    private ArrayList shippingLocations = new ArrayList();
    private ArrayList billingLocations = new ArrayList();
   // private ContactPerson contactPersonObject = new ContactPerson();
    private ContactPerson billingContactPersonObject = new ContactPerson();
    private ContactPerson shippingContactPersonObject = new ContactPerson();
    private ContactPerson contactPersonObject = new ContactPerson();
    private ContactPerson billingLocationContactPersonObject = new ContactPerson();


    private String newRegion = null;
    private String newRepOffice = null;
    private String newSalesPerson = null;
    private String newSalesRep = null;
    private String address = null;

    private String endUserName = null;
    private int jitWindow = 0;
    Random r = new Random();

    private int customerId = r.nextInt( 10000 ) * ( -1 );
    private int billAddressId = ( r.nextInt( 10000 ) + 10001 ) * ( -1 );
    private int shipAddressId = ( r.nextInt( 10000 ) + 20001 ) * ( -1 );

    private int gpDexRowId = -1;
    private int defaultBillingGpDexRowId = -1;
    private int defaultShippingGpDexRowId = -1;
 
    private String printName = null;
    private String supplierNumber = null;
    private String contractNumber = null;
    private String specificationNumber = null;
    private boolean customRequirements = false;
    private boolean ecnChangeNotification = false;
	private boolean isDistributor = false;

    private ArrayList customerTypeList = new ArrayList();
    protected String[] selectedCustomerTypes = { "1" };
    private int shippingInstructionsId = -1;

    private String marketingHold = null;
    private String financeHold = null;
    private String salesHold = null;
    private String operationsHold = null;

    private String sampleMarketingHold = null;
    private String sampleFinanceHold = null;
    private String sampleSalesHold = null;
    private String sampleOperationsHold = null;
    
    private int deliveryTermsId;
    private String deliveryTerms;
    private boolean isConsignee;
    private boolean isDefaultConsignment;
    private boolean isTrackInventory;
    private int revenueType;

    private String shippingTerms = null;
    private String newShippingTerms = null;
	private ArrayList allShippingTerms = null;
    private boolean isSample;

    /**
     * Default Constructor
     *
     */
    public Customer()
    {

    }

    /**
     * Constructor - 2
     * Used in PackingSlip
     */
    public Customer( int customerId, String customerName, String customerNumber, String repOffice, String shippingInstructions, String terms )
    {
        this.customerId = customerId;
        this.customerName = customerName;
        this.customerNumber = customerNumber;
        this.repOffice = repOffice;
        this.shippingInstructions = shippingInstructions;
        this.terms = terms;
    }


    /**
     * Constructor
     *
     */
    public Customer( int customerId, String customerName, String customerNumber, String contactPerson,
                     String shippingMethod1, String shippingMethod2, String shippingMethod3,
                     String shippingAccount1, String shippingAccount2, String shippingAccount3,
                     String region, String repOffice, String salesPerson, String shippingInstructions,
                     int defaultShippingAddressId, int defaultBillingAddressId, String priority,
                     int cancellationWindow, boolean revisionRestriction, boolean locationRestriction,
                     boolean dateCodeRestriction, String noOfDateCodeRestriction, boolean trayCodeRestriction,
                     String noOfTrayCodeRestrictions, int leastShippableQty, int creditLimit,
                     String repId, String repName)
    {
        this.customerId = customerId;
        this.customerName = customerName;
        this.customerNumber = customerNumber;
        this.contactPerson = contactPerson;
        this.shippingMethod1 = shippingMethod1;
        this.shippingMethod2 = shippingMethod2;
        this.shippingMethod3 = shippingMethod3;
        this.shippingAccount1 = shippingAccount1;
        this.shippingAccount2 = shippingAccount2;
        this.shippingAccount3 = shippingAccount3;
        this.region = region;
        this.repOffice = repOffice;
        this.salesPerson = salesPerson;
        //this.salesRep = salesRep;
        this.shippingInstructions = shippingInstructions;
        this.defaultBillingAddressId = defaultBillingAddressId;
        this.defaultShippingAddressId = defaultShippingAddressId;
        this.priority = priority;
        this.cancellationWindow = cancellationWindow;
        this.revisionRestriction = revisionRestriction;
        this.locationRestriction = locationRestriction;
        this.dateCodeRestriction = dateCodeRestriction;
        this.noOfDateCodeRestrictions = noOfDateCodeRestriction;
        this.trayCodeRestriction = trayCodeRestriction;
        this.noOfTrayCodeRestrictions = noOfTrayCodeRestrictions;
        this.leastShippableQty = leastShippableQty;
        this.creditLimit = creditLimit;
        this.repId = repId;
        this.repName = repName;
    }


    /**
     * @return customerId
     */
    public int getCustomerId()
    {
        return customerId;
    }


    /**
     * Set the customerId
     *
     * @param customerId
     */
    public void setCustomerId( int customerId )
    {
        this.customerId = customerId;
    }

    public int getBillAddressId()
    {
        return billAddressId;
    }

    public void setBillAddressId( int billAddressId )
    {
        this.billAddressId = billAddressId;
    }

    public int getShipAddressId()
    {
        return shipAddressId;
    }

    public void setShipAddressId( int shipAddressId )
    {
        this.shipAddressId = shipAddressId;
    }


    /**
     * @return customerName
     */
    public String getCustomerName()
    {
        return customerName;
    }

    /**
     * Set the customer name
     *
     * @param customerName
     */
    public void setCustomerName( String customerName )
    {
        this.customerName = customerName;
    }

    /**
     * @return contactPerson
     */
    public String getContactPerson()
    {
        return contactPerson;
    }

    /**
     * Set the contactPerson
     *
     * @param contactPerson
     */
    public void setContactPerson( String contactPerson )
    {
        this.contactPerson = contactPerson;
    }

    /**
     * @return shippingMethod1
     */
    public String getShippingMethod1()
    {
        if( shippingMethod1 != null )
        {
            shippingMethod1 = shippingMethod1.trim();
        }
        return shippingMethod1;
    }

    /**
     * Set the shippingMethod1
     *
     * @param shippingMethod1
     */
    public void setShippingMethod1( String shippingMethod1 )
    {
        this.shippingMethod1 = shippingMethod1;
    }

    /**
     * @return shippingMethod2
     */
    public String getShippingMethod2()
    {
        return shippingMethod2;
    }

    /**
     * Set the shippingMethod2
     *
     * @param shippingMethod2
     */
    public void setShippingMethod2( String shippingMethod2 )
    {
        this.shippingMethod2 = shippingMethod2;
    }

    /**
     * @return shippingMethod3
     */
    public String getShippingMethod3()
    {
        return shippingMethod3;
    }

    /**
     * Set the shippingMethod3
     *
     * @param shippingMethod3
     */
    public void setShippingMethod3( String shippingMethod3 )
    {
        this.shippingMethod3 = shippingMethod3;
    }


    /**
     * @return shippingAccount1
     */
    public String getShippingAccount1()
    {
        if( shippingAccount1 != null )
        {
            shippingAccount1 = shippingAccount1.trim();
        }
        return shippingAccount1;
    }

    /**
     * Set the shippingAccount1
     *
     * @param shippingAccount1
     */
    public void setShippingAccount1( String shippingAccount1 )
    {
        this.shippingAccount1 = shippingAccount1;
    }

    /**
     * @return shippingAccount2
     */
    public String getShippingAccount2()
    {
        return shippingAccount2;
    }

    /**
     * Set the shippingAccount2
     *
     * @param shippingAccount2
     */
    public void setShippingAccount2( String shippingAccount2 )
    {
        this.shippingAccount2 = shippingAccount2;
    }


    /**
     * @return shippingAccount3
     */
    public String getShippingAccount3()
    {
        return shippingAccount3;
    }

    /**
     * Set the shippingAccount3
     *
     * @param shippingAccount3
     */
    public void setShippingAccount3( String shippingAccount3 )
    {
        this.shippingAccount3 = shippingAccount3;
    }

    public String getNewShippingAccount1()
    {
        if( newShippingAccount1 != null )
        {
            newShippingAccount1 = newShippingAccount1.trim();
        }
        return newShippingAccount1;

    }

    public void setNewShippingAccount1( String newShippingAccount1 )
    {
        this.newShippingAccount1 = newShippingAccount1;
    }

    public String getNewShippingMethod1()
    {
        if( newShippingMethod1 != null )
        {
            newShippingMethod1 = newShippingMethod1.trim();
        }
        return newShippingMethod1;
    }

    public void setNewShippingMethod1( String newShippingMethod1 )
    {
        this.newShippingMethod1 = newShippingMethod1;
    }

    public String getNewShippingAccount2()
    {
        return newShippingAccount2;
    }

    public void setNewShippingAccount2( String newShippingAccount2 )
    {
        this.newShippingAccount2 = newShippingAccount2;
    }

    public String getNewShippingMethod2()
    {
        return newShippingMethod2;
    }

    public void setNewShippingMethod2( String newShippingMethod2 )
    {
        this.newShippingMethod2 = newShippingMethod2;
    }

    public String getNewShippingAccount3()
    {
        return newShippingAccount3;
    }

    public void setNewShippingAccount3( String newShippingAccount3 )
    {
        this.newShippingAccount3 = newShippingAccount3;
    }

    public String getNewShippingMethod3()
    {
        return newShippingMethod3;
    }

    public void setNewShippingMethod3( String newShippingMethod3 )
    {
        this.newShippingMethod3 = newShippingMethod3;
    }


    public ArrayList getShippingMethods()
    {
        return shippingMethods;
    }

    public void setShippingMethods( ArrayList shippingMethods )
    {
        this.shippingMethods = shippingMethods;
    }


    /**
     * @return region
     */
    public String getRegion()
    {
        return region;
    }

    /**
     * Set the region
     *
     * @param region
     */
    public void setRegion( String region )
    {
        this.region = region;
    }


    /**
     * @return repOffice
     */
    public String getRepOffice()
    {
        return repOffice;
    }

    /**
     * Set the repOffice
     *
     * @param repOffice
     */
    public void setRepOffice( String repOffice )
    {
        this.repOffice = repOffice;
    }

    /**
     * @return terms
     */
    public String getTerms()
    {
        return this.terms;
    }

    /**
     * Set the terms attribute
     */
    public void setTerms( String terms )
    {
        this.terms = terms;
    }


    /**
     * @return salesPerson
     */
    public String getSalesPerson()
    {
        if( salesPerson != null ){
            salesPerson = salesPerson.trim() ;
        }
        return salesPerson;
    }

    /**
     * Set the salesPerson
     *
     * @param salesPerson
     */
    public void setSalesPerson( String salesPerson )
    {
        if( salesPerson != null ){
            salesPerson = salesPerson.trim() ;
        }
        this.salesPerson = salesPerson;
    }

    /**
     * @return salesRep
     */
    public String getSalesRep()
    {
        return salesRep;
    }

    /**
     * Set the salesPerson
     *
     * @param salesRep
     */
    public void setSalesRep( String salesRep )
    {
        this.salesRep = salesRep;
    }


    /**
     * @return shippingInstructions
     */
    public String getShippingInstructions()
    {
        return shippingInstructions;
    }

    /**
     * Set the shippingInstructions
     *
     * @param shippingInstructions
     */
    public void setShippingInstructions( String shippingInstructions )
    {
        this.shippingInstructions = shippingInstructions;
    }


    /**
     * @return defaultShippingAddressId
     */
    public int getDefaultShippingAddressId()
    {
        return defaultShippingAddressId;
    }


    /**
     * Set the defaultShippingAddressId
     *
     * @param defaultShippingAddressId
     */
    public void setDefaultShippingAddressId( int defaultShippingAddressId )
    {
        this.defaultShippingAddressId = defaultShippingAddressId;
    }

    /**
     * @return defaultBillingAddressId
     */
    public int getDefaultBillingAddressId()
    {
        return defaultBillingAddressId;
    }


    /**
     * Set the defaultBillingAddressId
     *
     * @param defaultBillingAddressId
     */
    public void setDefaultBillingAddressId( int defaultBillingAddressId )
    {
        this.defaultBillingAddressId = defaultBillingAddressId;
    }

    /**
     * @return priority
     */
    public String getPriority()
    {
        return priority;
    }

    /**
     * Set the priority
     *
     * @param priority
     */
    public void setPriority( String priority )
    {
        this.priority = priority;
    }

    /**
     * @return cancellationWindow
     */
    public int getCancellationWindow()
    {
        return cancellationWindow;
    }


    /**
     * Set the cancellationWindow
     *
     * @param cancellationWindow
     */
    public void setCancellationWindow( int cancellationWindow )
    {
        this.cancellationWindow = cancellationWindow;
    }


    /**
     * @return revisionRestriction
     */
    public boolean getRevisionRestriction()
    {
        return revisionRestriction;
    }


    /**
     * Set the revisionRestriction
     *
     * @param revisionRestriction
     */
    public void setRevisionRestriction( boolean revisionRestriction )
    {
        this.revisionRestriction = revisionRestriction;
    }


    /**
     * @return locationRestriction
     */
    public boolean getLocationRestriction()
    {
        return this.locationRestriction;
    }


    /**
     * Set the locationRestriction
     *
     * @param locationRestriction
     */
    public void setLocationRestriction( boolean locationRestriction )
    {
        //System.out.println("Set = " + locationRestriction);
        this.locationRestriction = locationRestriction;
    }

    public String[] getSelectedLocations()
    {
        return selectedLocations;
    }

    public void setSelectedLocations( String[] selectedLocations )
    {
        this.selectedLocations = selectedLocations;
    }


    /**
     * @return dateCodeRestriction
     */
    public boolean getDateCodeRestriction()
    {
        return dateCodeRestriction;
    }


    /**
     * Set the dateCodeRestriction
     *
     * @param dateCodeRestriction
     */
    public void setDateCodeRestriction( boolean dateCodeRestriction )
    {
        this.dateCodeRestriction = dateCodeRestriction;
    }

    /**
     * @return noOfDateCodeRestrictions
     */
    public String getNoOfDateCodeRestrictions()
    {
        return noOfDateCodeRestrictions;
    }


    /**
     * Set the noOfDateCodeRestrictions
     *
     * @param noOfDateCodeRestrictions
     */
    public void setNoOfDateCodeRestrictions( String noOfDateCodeRestrictions )
    {
        this.noOfDateCodeRestrictions = noOfDateCodeRestrictions;
    }

    /**
     * @return trayCodeRestriction
     */
    public boolean getTrayCodeRestriction()
    {
        return trayCodeRestriction;
    }


    /**
     * Set the trayCodeRestriction
     *
     * @param trayCodeRestriction
     */
    public void setTrayCodeRestriction( boolean trayCodeRestriction )
    {
        this.trayCodeRestriction = trayCodeRestriction;
    }

    /**
     * @return noOfTrayCodeRestrictions
     */
    public String getNoOfTrayCodeRestrictions()
    {
        return noOfTrayCodeRestrictions;
    }


    /**
     * Set the noOfTrayCodeRestrictions
     *
     * @param noOfTrayCodeRestrictions
     */
    public void setNoOfTrayCodeRestrictions( String noOfTrayCodeRestrictions )
    {
        this.noOfTrayCodeRestrictions = noOfTrayCodeRestrictions;
    }

    /**
     * @return leastShippableQty
     */
    public int getLeastShippableQty()
    {
        return leastShippableQty;
    }


    /**
     * Set the leastShippableQty
     *
     * @param leastShippableQty
     */
    public void setLeastShippableQty( int leastShippableQty )
    {
        this.leastShippableQty = leastShippableQty;
    }

    /**
     * @return creditLimit
     */
    public int getCreditLimit()
    {
        return creditLimit;
    }


    /**
     * Set the creditLimit
     *
     * @param creditLimit
     */
    public void setCreditLimit( int creditLimit )
    {
        this.creditLimit = creditLimit;
    }

    /**
     * @return repId
     */
    public String getRepId()
    {
        return repId;
    }

    /**
     * Set the repId
     *
     * @param repId
     */
    public void setRepId( String repId )
    {
        this.repId = repId;
    }

    /**
     * @return repName
     */
    public String getRepName()
    {
        return repName;
    }

    /**
     * Set the repName
     *
     * @param repName
     */
    public void setRepName( String repName )
    {
        this.repName = repName;
    }


    /**
     * Get billingAddress
     *
     * @return billingAddress
     */
    public Address getBillingAddress()
    {
        return billingAddress;
    }

    /**
     * Set the billingAddress
     *
     * @param billingAddress
     */
    public void setBillingAddress( Address billingAddress )
    {
        this.billingAddress = billingAddress;
    }


    /**
     * Get shippingAddress
     *
     * @return shippingAddress
     */
    public Address getShippingAddress()
    {
        return shippingAddress;
    }

    /**
     * Set the shippingAddress
     *
     * @param shippingAddress
     */
    public void setShippingAddress( Address shippingAddress )
    {
        this.shippingAddress = shippingAddress;
    }

    /**
     * Get shippingLocations
     *
     * @return shippingLocations
     */
    public ArrayList getShippingLocations()
    {
        return shippingLocations;
    }

    public String getCustomerNumber()
    {
        return customerNumber;
    }

    public void setCustomerNumber( String customerNumber )
    {
        this.customerNumber = customerNumber;
    }


    /**
     * Set the shippingLocations
     *
     * @param shippingLocations
     */
    public void setShippingLocations( ArrayList shippingLocations )
    {
        this.shippingLocations = shippingLocations;
    }

    public void setAddShippingLocation( String empty )
    {
        Address address = new Address();
        ArrayList contactPersonList = new ArrayList();
        address.setAddressId( -1 );
        address.setAddress1( "" );
        address.setAddress2( "" );
        address.setCity( "" );
        address.setState( "" );
        address.setZipCode( "" );
        address.setCountry( "" );
        address.setContactPerson( "" );
        address.setContactPersons( contactPersonList );
        // Modified by Prabhanjan (24 May 2004). Defined range for locAddressId between 30001 & 40000
        //address.setLocAddressId((new Random().nextInt(123456789))*(-1));
        address.setLocAddressId( ( ( new Random().nextInt( 10000 ) + 30001 ) * ( -1 ) ) );
        shippingLocations.add( address );
    }
    public void setAddBillingLocation( String empty )
    {
        Address address = new Address();
        ArrayList contactPersonList = new ArrayList();
        address.setAddressId( -1 );
        address.setAddress1( "" );
        address.setAddress2( "" );
        address.setCity( "" );
        address.setState( "" );
        address.setZipCode( "" );
        address.setCountry( "" );
        address.setContactPerson( "" );
        address.setContactPersons( contactPersonList );
        address.setLocAddressId( ( ( new Random().nextInt( 10000 ) + 30001 ) * ( -1 ) ) );
        billingLocations.add( address );
    }

    //For shipping instructions..not to send earler than this many days...
    public boolean getShippingRestriction()
    {
        return shippingRestriction;
    }

    public void setShippingRestriction( boolean shippingRestriction )
    {
        this.shippingRestriction = shippingRestriction;
    }

    public int getNoOfShippingDaysNotEarlierThan()
    {
        return noOfShippingDays;
    }

    public void setNoOfShippingDaysNotEarlierThan( int noOfShippingDays )
    {
        this.noOfShippingDays = noOfShippingDays;
    }


    public String getNewRegion()
    {
        return newRegion;
    }

    public void setNewRegion( String newRegion )
    {
        this.newRegion = newRegion;
    }

    public String getNewRepOffice()
    {
        return newRepOffice;
    }

    public void setNewRepOffice( String newRepOffice )
    {
        this.newRepOffice = newRepOffice;
    }

    public String getNewSalesPerson()
    {
        return newSalesPerson;
    }

    public void setNewSalesPerson( String newSalesPerson )
    {
        this.newSalesPerson = newSalesPerson;
    }

    //added by varma 23 jul 2004
    public String getNewSalesRep()
    {
        return newSalesRep;
    }

    public void setNewSalesRep( String newSalesRep )
    {
        this.newSalesRep = newSalesRep;
    }



//Added by sarada
    private String shippingMethodName1 = null;
    private String shippingMethodName2 = null;
    private String shippingMethodName3 = null;


    public String getShippingMethodName1()
    {
        return shippingMethodName1;
    }

    /**
     * Set the shippingMethod1
     *
     * @param shippingMethodName1
     */


    public void setShippingMethodName1( String shippingMethodName1 )
    {
        this.shippingMethodName1 = shippingMethodName1;
    }

    /**
     * @return shippingMethod2
     */
    public String getShippingMethodName2()
    {
        return shippingMethodName2;
    }

    /**
     * Set the shippingMethod2
     *
     * @param shippingMethodName2
     */
    public void setShippingMethodName2( String shippingMethodName2 )
    {
        this.shippingMethodName2 = shippingMethodName2;
    }

    /**
     * @return shippingMethod3
     */
    public String getShippingMethodName3()
    {
        return shippingMethodName3;
    }

    /**
     * Set the shippingMethod3
     *
     * @param shippingMethodName3
     */
    public void setShippingMethodName3( String shippingMethodName3 )
    {
        this.shippingMethodName3 = shippingMethodName3;
    }

    public String getPrintName() {
        return printName;
    }

    public void setPrintName(String printName) {
        this.printName = printName;
    }

    public String getSupplierNumber() {
        return supplierNumber;
    }

    public void setSupplierNumber(String supplierNumber) {
        this.supplierNumber = supplierNumber;
    }

    public String getContractNumber() {
        return contractNumber;
    }

    public void setContractNumber(String contractNumber) {
        this.contractNumber = contractNumber;
    }

    public String getSpecificationNumber() {
        return specificationNumber;
    }

    public void setSpecificationNumber(String specificationNumber) {
        this.specificationNumber = specificationNumber;
    }

    public boolean getCustomRequirements() {
        return customRequirements;
    }

    public void setCustomRequirements(boolean customRequirements) {
        this.customRequirements = customRequirements;
    }

    public boolean getEcnChangeNotification() {
        return ecnChangeNotification;
    }

    public void setEcnChangeNotification(boolean ecnChangeNotification) {
        this.ecnChangeNotification = ecnChangeNotification;
    }
	
    public boolean getIsDistributor() {
        return isDistributor;
    }

    public void setIsDistributor(boolean isDistributor) {
        this.isDistributor = isDistributor;
    }

    //Added by Sarada on 8th March 2004
    /**
     * @return
     */
    public String getAddress()
    {
        return address;
    }

    /**
     * @param address
     */
    public void setAddress( String address )
    {
        this.address = address;
    }


    public ContactPerson getContactPersonObject()
    {
        return contactPersonObject;
    }

    public void setContactPersonObject( ContactPerson contactPersonObject )
    {
        this.contactPersonObject = contactPersonObject;
    }

    //Added by Sarada on 7th April to get billing address contact persons
    public ContactPerson getBillingContactPersonObject()
    {
        return billingContactPersonObject;
    }

    public void setBillingContactPersonObject( ContactPerson billingContactPersonObject )
    {
        this.billingContactPersonObject = billingContactPersonObject;
    }


    public ContactPerson getShippingContactPersonObject()
    {
        return shippingContactPersonObject;
    }

    public void setShippingContactPersonObject( ContactPerson shippingContactPersonObject )
    {
        this.shippingContactPersonObject = shippingContactPersonObject;
    }

    /*public ContactPerson getShipLocationContactPersonObject()
    {
        return contactPersonObject;
    }

    public void setShipLocationContactPersonObject( ContactPerson contactPersonObject )
    {
        this.contactPersonObject = contactPersonObject;
    }*/

    public String getEndUserName()
    {
        return endUserName;
    }

    public void setEndUserName( String endUserName )
    {
        this.endUserName = endUserName;
    }

    public int getGpDexRowId()
    {
        return gpDexRowId;
    }

    public void setGpDexRowId( int gpDexRowId )
    {
        this.gpDexRowId = gpDexRowId;
    }

    public int getDefaultBillingGpDexRowId()
    {
        return defaultBillingGpDexRowId;
    }

    public void setDefaultBillingGpDexRowId( int defaultBillingGpDexRowId )
    {
        this.defaultBillingGpDexRowId = defaultBillingGpDexRowId;
    }

    public int getDefaultShippingGpDexRowId()
    {
        return defaultShippingGpDexRowId;
    }

    public void setDefaultShippingGpDexRowId( int defaultShippingGpDexRowId )
    {
        this.defaultShippingGpDexRowId = defaultShippingGpDexRowId;
    }

    public ArrayList getCustomerTypeList() {
            return customerTypeList;
    }

    public void setCustomerTypeList(ArrayList customerTypeList) {
        this.customerTypeList = customerTypeList;
    }

    public String[] getSelectedCustomerTypes() {
        return selectedCustomerTypes;
    }

    public void setSelectedCustomerTypes(String[] selectedCustomerTypes) {
        this.selectedCustomerTypes = selectedCustomerTypes;
    }

    public int getJitWindow()
    {
        return jitWindow;
    }
    public void setJitWindow( int jitWindow)
    {
        this.jitWindow = jitWindow;
    }

    public int getShippingInstructionsId() {
        return shippingInstructionsId;
    }

    public void setShippingInstructionsId(int shippingInstructionsId) {
        this.shippingInstructionsId = shippingInstructionsId;
    }


    /**
     * This method will format the contents of the customer object such that
     * they can be inserted in the CT database
     *
     */
    public void formatForInsertingIntoCT()
    {
        if( this.getCustomerName() == null )
        {
            this.setCustomerName( "" );
        }
        else
        {
            this.setCustomerName( this.getCustomerName().trim() );
        }

        if( this.getCustomerName().length() > 50 )
        {
            this.setCustomerName( this.getCustomerName().substring( 0, 49 ) );
        }

        //need to add code to format other fields also if needed
    }

    public String getMarketingHold() {
        return marketingHold;
    }

    public void setMarketingHold(String marketingHold) {
        this.marketingHold = marketingHold;
    }

    public String getFinanceHold() {
        return financeHold;
    }

    public void setFinanceHold(String financeHold) {
        this.financeHold = financeHold;
    }

    public String getSalesHold() {
        return salesHold;
    }

    public void setSalesHold(String salesHold) {
        this.salesHold = salesHold;
    }

    public String getOperationsHold() {
        return operationsHold;
    }

    public void setOperationsHold(String operationsHold) {
        this.operationsHold = operationsHold;
    }


    public int getDeliveryTermsId()
    {
        return deliveryTermsId;
    }

    public void setDeliveryTermsId(int deliveryTermsId)
    {
        this.deliveryTermsId = deliveryTermsId;
    }


    public String getDeliveryTerms() {
        return deliveryTerms;
    }

    public void setDeliveryTerms(String deliveryTerms) {
        this.deliveryTerms = deliveryTerms;
    }


    public boolean getIsConsignee() {
        return isConsignee;
    }

    public void setIsConsignee(boolean isConsignee) {
        this.isConsignee = isConsignee;
    }


    public boolean getIsDefaultConsignment() {
        return isDefaultConsignment;
    }

    public void setIsDefaultConsignment(boolean isDefaultConsignment) {
        this.isDefaultConsignment = isDefaultConsignment;
    }

    public boolean getIsTrackInventory() {
        return isTrackInventory;
    }

    public void setIsTrackInventory(boolean isTrackInventory) {
        this.isTrackInventory = isTrackInventory;
    }

    public int getRevenueType() {
        return revenueType;
    }

    public void setRevenueType(int revenueType) {
        this.revenueType = revenueType;
    }


    public String getShippingTerms() {
        return shippingTerms;
    }

    public void setShippingTerms(String shippingTerms) {
        this.shippingTerms = shippingTerms;
    }

    public ArrayList getAllShippingTerms() {
        return allShippingTerms;
    }

    public void setAllShippingTerms(ArrayList allShippingTerms) {
        this.allShippingTerms = allShippingTerms;
    }

    public String getNewShippingTerms() {
        return newShippingTerms;
    }

    public void setNewShippingTerms(String newShippingTerms) {
        this.newShippingTerms = newShippingTerms;
    }


    public String getSampleMarketingHold() {
        return sampleMarketingHold;
    }

    public void setSampleMarketingHold(String sampleMarketingHold) {
        this.sampleMarketingHold = sampleMarketingHold;
    }

    public String getSampleFinanceHold() {
        return sampleFinanceHold;
    }

    public void setSampleFinanceHold(String sampleFinanceHold) {
        this.sampleFinanceHold = sampleFinanceHold;
    }

    public String getSampleSalesHold() {
        return sampleSalesHold;
    }

    public void setSampleSalesHold(String sampleSalesHold) {
        this.sampleSalesHold = sampleSalesHold;
    }

    public String getSampleOperationsHold() {
        return sampleOperationsHold;
    }

    public void setSampleOperationsHold(String sampleOperationsHold) {
        this.sampleOperationsHold = sampleOperationsHold;
    }

    public boolean getIsSample() {
        return isSample;
    }

    public void setIsSample(boolean isSample) {
        this.isSample = isSample;
    }

    public ArrayList getBillingLocations() {
        return billingLocations;
    }

    public void setBillingLocations(ArrayList billingLocations) {
        this.billingLocations = billingLocations;
    }

    public ContactPerson getBillingLocationContactPersonObject() {
        return billingLocationContactPersonObject;
    }

    public void setBillingLocationContactPersonObject(ContactPerson billingLocationContactPersonObject) {
        this.billingLocationContactPersonObject = billingLocationContactPersonObject;
    }
}